define([
    "esri/layers/IntegratedMeshLayer"
], function(IntegratedMeshLayer) {
    var layer = IntegratedMeshLayer.createSubclass({
        setData: function(mapView, layer) {
            var me = this;
            if (!mapView) {
                return
            };
            var options = layer.layer || {};
            var data = options.data || [];
            me.popupEnabled = options.popupEnabled || false;
            if (typeof options.callback == 'function') {
                options.callback(me);
            };
        },
        getGraphicLocation: function(mapView, esriEvent, mapUtils) {
            var mapPoint = esriEvent.mapPoint || {};
            var lngFieldName = mapView.getLngFieldName();
            var latFieldName = mapView.getLatFieldName();
            var location = {};
            location[lngFieldName] = mapPoint.longitude;
            location[latFieldName] = mapPoint.latitude;
            return location;
        }
    });
    return layer;
});